<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>el与data的两种写法</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <h1>Hello,{{name}}</h1>
    </div>
    <script>
        var v = new Vue({
            data:function () {
                return {
                    name:'百度'
                }
            }
        });

        setTimeout(() =>{
            v.$mount('#root')
        },1000)
    </script>
</body>
</html>